﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AMS.DataAccess.DatabaseSchema
{
    /// <summary>
    /// 描述一个表的列信息的类
    /// </summary>
    [DBTable]
    public class TableColumnInfo
    {
        [DBColumn]
        public string TableName { get; set; }

        [DBColumn]
        public string TableDesc { get; set; }

        [DBColumn("Column_id")]
        public string ColumnID { get; set; }

        [DBColumn]
        public string IndexName { get; set; }

        [DBColumn]
        public string ColumnName { get; set; }

        [DBColumn]
        public string PrimaryKey { get; set; }

        [DBColumn("is_identity")]
        public bool IsIdentity { get; set; }

        [DBColumn("is_computed")]
        public bool IsComputed { get; set; }

        [DBColumn]
        public string Type { get; set; }

        [DBColumn]
        public int Length { get; set; }

        [DBColumn]
        public int Precision { get; set; }

        [DBColumn]
        public int Scale { get; set; }

        [DBColumn("is_nullable")]
        public bool IsNullable { get; set; }

        [DBColumn]
        public string DefaultValue { get; set; }

        [DBColumn]
        public string ColumnDesc { get; set; }

        [DBColumn]
        public string IndexSort { get; set; }

        [DBColumn]
        public string Create_Date { get; set; }

        [DBColumn]
        public string Modify_Date { get; set; }

        /// <summary>
        /// 列在索引中的序号
        /// </summary>
        [DBColumn("key_ordinal")]
        public int KeyOrdinal { get; set; }

    }
}
